package br.com.registrofinancas.view;

import br.com.registrofinancas.R;
import br.com.registrofinancas.database.UsuarioDAO;
import br.com.registrofinancas.model.UsuarioVO;
import br.com.registrofinancas.participantes.FragmentDialogoParticipantes;
import br.com.registrofinancas.util.UsuarioUtils;
import android.app.DialogFragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class MenuActivity extends DashBoardActivity {
	
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_menu);
		setHeader(getString(R.string.title_actitivy_menu), false, true);		
	}

	/**
	 * Metodo para verificar qual activity é chamada
	 * @param v
	 */
	public void onButtonClicker(View v)
	{
		Intent intent;

		switch (v.getId()) {
		case R.id.activity_menu_ll_bt_calendar:
			intent = new Intent(this, CalendarioActivity.class);
			startActivity(intent);
			break;

		case R.id.activity_menu_ll_bt_backup:
			try {
				intent = new Intent(this, BackupActivity.class);
				startActivity(intent);
			} catch (Exception e) {
				e.printStackTrace();
			}
			
			break;

		case R.id.activity_menu_ll_bt_financial_map:
			intent = new Intent(this, FinancialMapActivity.class);
			startActivity(intent);
			break;
			
//		case R.id.activity_menu_ll_bt_graphics:
//			intent = new Intent(this, GraphicsActivity.class);
//			startActivity(intent);
//			break;

		case R.id.activity_menu_ll_bt_category:
			intent = new Intent(this, CategoryActivity.class);
			startActivity(intent);
			break;

		case R.id.activity_menu_ll_bt_finances:
			intent = new Intent(this, FinancasActivity.class);
			startActivity(intent);
			break;

		case R.id.activity_menu_ll_bt_exludedata:
			intent = new Intent(this, ExcludeActivity.class);
			startActivity(intent);
			break;
			
		case R.id.activity_menu_ll_bt_information:
			FragmentDialogoParticipantes fragmentDialogoParticipantes = new FragmentDialogoParticipantes();
			fragmentDialogoParticipantes.show(getFragmentManager(), "FragmentDialogoParticipantes");
			fragmentDialogoParticipantes.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
			break;
		default:
			break;
		}
	}
}
